<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="model.*"%>
<%@ page import="dao.*"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<%
	List<Strategy> strategys = new ArrayList<Strategy>();
	strategys = StrategyDao.getStrategys();
	for (Strategy item : strategys) {
		System.out.println(item.getId());
	}
	request.setAttribute("strategys", strategys);
%>
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8" />
<title>旅游攻略</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<link
	href="http://fonts.googleapis.com/css?family=Hind:300,400,500,600,700"
	rel="stylesheet" type="text/css">
<link href="vendor/simple-line-icons/simple-line-icons.min.css"
	rel="stylesheet" type="text/css" />
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<link href="css/animate.css" rel="stylesheet">
<link href="vendor/swiper/css/swiper.min.css" rel="stylesheet"
	type="text/css" />

<!-- THEME STYLES -->
<link href="css/layout.min.css" rel="stylesheet" type="text/css" />

<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->

<!-- BODY -->
<body id="body" data-spy="scroll" data-target=".header">

	<jsp:include page="Header.jsp" flush="true"></jsp:include>

<div id="旅游攻略">
	<div class="content-lg container">
		<div class="row margin-b-40">
			<div class="col-sm-6">
				<h2>旅游攻略</h2>
				<p></p>
			</div>
		</div>
		<!--// end row -->
		<div >
			<div class="row">
		

				<c:forEach var="strategy" items="${strategys}" varStatus="status">
					<c:choose>
						<c:when test="${(status.index+1 )%2 =='0'}">
							<div onclick="window.open('StrategyInfo.jsp?sid=${strategy.id}')"  class="masonry-grid-item col-xs-12 col-sm-6 col-md-6">

								<div class="margin-b-60">${strategy.getUrl() }</div>
								<h2>${strategy.name }</h2>
							</div>
						</c:when>
						<c:otherwise>
							<div  onclick="window.open('StrategyInfo.jsp?sid=${strategy.id}')"  style="background: #e5e5e5;"
								class="masonry-grid-item col-xs-12 col-sm-6 col-md-6 sm-margin-b-30">
								<div class="margin-b-60">
									<h2>${strategy.name }</h2>
								</div>
								${strategy.getUrl() }

							</div>

						</c:otherwise>
					</c:choose>

				</c:forEach>


			</div>
			<!--// end row -->
		</div>
	</div>
</div>

	<jsp:include page="Footer.jsp" flush="true"></jsp:include>

	<!-- Back To Top -->
	<a href="javascript:void(0);" class="js-back-to-top back-to-top">Top</a>

	<!-- JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- CORE PLUGINS -->
	<script src="vendor/jquery.min.js" type="text/javascript"></script>
	<script src="vendor/jquery-migrate.min.js" type="text/javascript"></script>
	<script src="vendor/bootstrap/js/bootstrap.min.js"
		type="text/javascript"></script>

	<!-- PAGE LEVEL PLUGINS -->
	<script src="vendor/jquery.easing.js" type="text/javascript"></script>
	<script src="vendor/jquery.back-to-top.js" type="text/javascript"></script>
	<script src="vendor/jquery.smooth-scroll.js" type="text/javascript"></script>
	<script src="vendor/jquery.wow.min.js" type="text/javascript"></script>
	<script src="vendor/swiper/js/swiper.jquery.min.js"
		type="text/javascript"></script>
	<script src="vendor/masonry/jquery.masonry.pkgd.min.js"
		type="text/javascript"></script>
	<script src="vendor/masonry/imagesloaded.pkgd.min.js"
		type="text/javascript"></script>


	<!-- PAGE LEVEL SCRIPTS -->
	<script src="js/layout.min.js" type="text/javascript"></script>
	<script src="js/components/wow.min.js" type="text/javascript"></script>
	<script src="js/components/swiper.min.js" type="text/javascript"></script>
	<script src="js/components/masonry.min.js" type="text/javascript"></script>
	<script src="js/components/google-map.min.js" type="text/javascript"></script>

</body>
<!-- END BODY -->
</html>